package com.wulinbus.dao.creative;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.wulinbus.model.CreativeLikeFlagModel;
import com.wulinbus.model.CreativeModel;

public interface CreativeDAO {

	public  List<CreativeModel> findCreativeByTitle(@Param("search")String search);

	public int getMaxCid();

	public void addCreative(CreativeModel creativeModel_c);

	public void addCreativeUrl(CreativeModel creativeModel_u);

	public List<CreativeModel> getCreativeList(@Param("keyword") String keyword, @Param("start") Integer start,@Param("count") Integer count);

	public Integer count(@Param("keyword") String keyword);

	public List<CreativeModel> getCreativeUrlList(@Param("cid") Integer cid);

	public void like(@Param("cid") Integer cid);

	public CreativeModel getCreativeByCid(@Param("cid") Integer cid);

	public CreativeModel findCreativeByCreativeTitle(@Param("title") String title);

	public List<CreativeModel> findCreativeByUid(@Param("uid") Integer uid,@Param("start") Integer start,@Param("pageSize") Integer pageSize);

	public List<CreativeModel> findCreativeListByUids(List<Integer> uids);

	public List<CreativeModel> findCreativeListByCids(List<Integer> cids);
	
	public List<CreativeModel> findCreativeListByMids(List<Integer> mids);
	
	public Integer countByUid(@Param("uid") Integer uid);

	public List<CreativeModel> findCreativeByUidOnly(@Param("uid") Integer uid);

	public List<String> getUrlListByCid(@Param("cid") Integer cid);

	public void updateCreative(CreativeModel creativeModel);

	public void deleteCreativeUrl(@Param("cid") Integer cid);

	public void setLikeFlag(@Param("cid") Integer cid,@Param("uid") String uid);

	public CreativeLikeFlagModel getCreativeLikeModel(@Param("cid") Integer cid,@Param("uid") String uid);

	public Integer getLikeByCid(@Param("cid") Integer cid);

	public Integer deleteCreativeUrlByMid(@Param("mid") Integer mid,@Param("cid") Integer cid);

	public List<CreativeModel> getMaxLikeCreativeList();

	public List<CreativeModel> getAllCreative(Integer start, Integer pageSize);

	public Integer delete(@Param("cid") Integer cid);
}
